import java.util.Stack;

public class Test {
    public static void main(String[] args) {
        MyStack myStack = new MyStack();
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);
        myStack.push(4);
        System.out.println("===");

        System.out.println(myStack.peek());
        System.out.println(myStack.peek());

        System.out.println(myStack.pop());

    }


    public static void main1(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);


        //删除栈顶元素
        int ret = stack.pop();
        System.out.println(ret);

        //获取栈顶元素
        int ret2 = stack.peek();
        System.out.println(ret2);

        System.out.println(stack.empty());
    }
}
